import 'package:banquanjie_app/app/services/screenAdapter.dart';
import 'package:flutter/material.dart';
class CompanyListCard extends StatelessWidget {
  final Map item;
  const CompanyListCard({super.key, required this.item});
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.fromLTRB(ScreenAdapter.width(14), ScreenAdapter.width(20), ScreenAdapter.width(14), ScreenAdapter.width(20)),
      width: ScreenAdapter.width(710),
      // height: ScreenAdapter.height(160),
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.all(Radius.circular(8)),
      ),
      child: Row(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: [
          Container(
            margin: EdgeInsets.only(right: ScreenAdapter.width(32)),
            width: ScreenAdapter.width(156),
            // height: ScreenAdapter.width(156),
            child: Column(
              children: [
                SizedBox(
                  width: ScreenAdapter.width(156),
                  height: ScreenAdapter.width(156),
                  child: Stack(
                    children: [
                      ClipOval(
                        child: Image.network(
                          item['headOssUrl'],
                          width: ScreenAdapter.width(156),
                          height: ScreenAdapter.width(156),
                          fit: BoxFit.cover
                        )
                      ),
                      Align(
                        alignment: Alignment(1, 1),
                        child: ClipRRect(
                          child: Image.network(
                            'https://zsjl.oss-cn-beijing.aliyuncs.com/test/xcx/auth_icon.png',
                            width: ScreenAdapter.width(30),
                            height: ScreenAdapter.width(30),
                            fit: BoxFit.cover
                          )
                        )
                      )
                    ]
                  )
                ),
                Text("${item['cityName']}", style: TextStyle(height: 2.3, fontSize: ScreenAdapter.fontSize(20), color: Color(0xFF000000)))
              ]
            ),
          ),
          Expanded(
            flex: 1,
            child: Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Text('${item['entName']}', style: TextStyle(height: 28 / 26,fontSize: ScreenAdapter.fontSize(26), fontWeight: FontWeight.w700, color: Color(0xFF000000))),
                SizedBox(height: ScreenAdapter.height(20)),
                Container(
                  height: ScreenAdapter.fontSize(24) * 1.1,
                  margin: EdgeInsets.only(right: ScreenAdapter.width(6)),
                  padding: EdgeInsets.symmetric(horizontal: ScreenAdapter.width(4)),
                  constraints: BoxConstraints(
                    // minWidth: ScreenAdapter.width(58),
                    // maxWidth: ScreenAdapter.width(58)
                  ),
                  decoration: BoxDecoration(
                    color: Color(0xFFF2F2F2),
                    borderRadius: BorderRadius.circular(ScreenAdapter.width(4)),
                  ),
                  clipBehavior: Clip.antiAlias,
                  child: Text(
                    '${item['brandTypeName']}', 
                    overflow: TextOverflow.ellipsis, 
                    maxLines: 1, 
                    style: TextStyle(
                      height: 1.1, 
                      fontSize: ScreenAdapter.fontSize(24), 
                      color: Color(0xFF00B277)
                    )
                  )
                ),
             
                SizedBox(height: ScreenAdapter.width(16)),
                Text('${item['remark']}', overflow: TextOverflow.ellipsis, maxLines: 3, style: TextStyle(height: 5 / 3,fontSize: ScreenAdapter.fontSize(24), color: Color(0xFF000000)))
              ]
            )
          )
        ]
      )
    );
  }
  
}